@import "colors";

$header-height: 90px;

.categories-wrapper {
  padding-top: $header-height;
  background-color: $white;
  height: auto;
}

.categories {
  padding-top: 50px;
  width: 80%;
  margin: 0 auto;
  a {
    text-decoration: none;
  }
  h1 {
    color: $navy-darker;
    font-size: 48px;
    font-weight: 900;
    line-height: 54px;
    letter-spacing: -2px;
  }
  h3 {
    width: auto;
    margin: 0;
    padding-top: 35px;
    &::after {
      margin-left: 0;
      margin-top: 10px;
      left: 10%;
      width: 210px;
      z-index: 0;
    }
  }
}

.row-buttons {
  padding-top: 85px;
  padding-bottom: 75px;
  max-width: 75vw;
  display: flex;
  justify-content: space-around;
}

.btn-category {
  display: flex;
  justify-content: flex-start;
  align-content: center;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 2px;
  color: $navy-darker;
  font-weight: 800;
  border: 3px solid $navy-darker;
  padding: 5px 30px 5px 10px;
  font-size: 14px;
  line-height: 14px;
  text-decoration: none;
  &.active,
  &:hover {
    background-color: $navy-darker;
    color: $white;
    transition-property: background-color;
    transition-duration: 0.2s;
  }
  &.active:hover {
    background-color: inherit;
    color: inherit;
  }
  span {
    padding-left: 15px;
    padding-top: 5px;
  }
  .fas {
    padding-top: 3px;
  }
}

.btn-aerial .fas {
  transform: rotate(-135deg) !important;
  margin-top: -5px;
}

.manipulator {
  height: 100%;
  width: 100%;
  margin-left: 0px;
}
.manipulator::before {
  content: url("/imgs/manipulator.svg");
  height: 20px;
  margin-left: 0px;
}

.active > .manipulator,
.btn-category:hover > .manipulator {
  filter: brightness(0) invert(1);
}

.btn-manipulator span {
  padding-left: 15px;
}
.col-tags {
  padding-bottom: 25px;
}
.tag {
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 2px;
  color: $navy-darker;
  font-weight: 800;
  border: 2px solid $navy-darker;
  padding: 5px 3px 4px 3px;
  margin-right: 2px;
  font-size: 12px;
  line-height: 36px;
  white-space: pre;
  text-decoration: none;
  &:hover {
    background-color: $navy-darker;
    color: $white;
    transition-property: background-color;
    transition-duration: 0.2s;
  }
}

.grid-wrapper {
  position: relative;
  padding-top: 25px;
}

.col-tags {
  width: 20%;
  position: absolute;
}

.categories-grid {
  display: block;
  margin-left: 0;
  padding-left: 23%;
}

.grid-item {
  width: 23%;
  padding-left: 2.5%;
}

.card {
  position: relative;
  width: 100%;
  -webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.6);
  -moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.6);
  box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.6);
  border-radius: 25px;
  border-top: 1px solid rgba(0, 0, 0, 1);
  border-top-color: rgba(0, 0, 0, 0.1);
  border-bottom-color: rgba(0, 0, 0, 0.1);
  height: fit-content;
  padding-bottom: 10px;
  margin-bottom: 1.5em;
  order: 2;
  .card-title {
    padding-top: 10px;
    padding-left: 5%;
    font-size: 18px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    a {
      color: inherit;
    }
  }
  .card-title + * {
    padding-top: 0;
  }
  .card-subtitle {
    padding-left: 5%;
    font-size: 14px;
    line-height: 14px;
    font-weight: 500;
    font-style: italic;
    color: $gray-light;
  }
  .card-subtitle + * {
    padding-top: 0;
  }
  a img,
  img {
    object-fit: contain;
    width: 100%;
    border-radius: 25px 25px 0 0;
  }
  .card-description {
    padding-left: 2.5%;
  }
}
.card-description {
  padding-bottom: 10px;
  p,
  a {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
  }
  a {
    padding-left: 2.5%;
    text-decoration: underline;
    color: $aqua;
  }

  p {
    color: $gray-light;
    width: 95%;
    margin: 0 auto;
  }
}

.card-facts {
  width: 100%;
  display: grid;
  grid-template-columns: 30% 30% 30%;
  grid-template-rows: 24px;
  grid-auto-rows: 24px;
  grid-row-gap: 10px;
  grid-column-gap: 3px;
  justify-content: center;
  margin-left: 1%;
  padding-bottom: 10px;
  .card-fact {
    color: $aqua;
    font-size: 12px;
    line-height: 12px;
    padding-top: 0;
    white-space: pre-line;
    &::after {
      display: none;
    }
  }
}

.featured {
  order: 1;
}

.ribbon {
  width: 95px;
  height: 0;
  position: absolute;
  top: 20px;
  right: -35px;
  border-bottom: 17px solid #fb9401;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  transform: rotate(45deg);
  h2 + * {
    padding-top: 10px;
  }
}
.ribbon::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 104px;
  border-left: 5px solid transparent;
  border-right: 5px solid $orange;
  border-top: 5px solid transparent;
  border-bottom: 5px solid $orange;
  transform: rotate(-90deg);
}
.ribbon::after {
  content: "";
  position: absolute;
  right: 103px;
  bottom: -30px;
  border-left: 5px solid transparent;
  border-right: 5px solid $orange;
  border-top: 5px solid transparent;
  border-bottom: 5px solid $orange;
  transform: rotate(180deg);
}

.ribbon-text {
  z-index: 1;
  color: $white;
  font-size: 12px;
  line-height: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  white-space: nowrap;
}

.row-buttons-mob {
  display: none;
}

@media screen and (max-width: 1200px) {
  .btn-category {
    width: auto;
    font-size: 10px;
    padding-right: 25px;
  }
}

@media screen and (max-width: 993px) {
  .categories-wrapper {
    padding-top: 0;
  }
  .row-buttons {
    display: none;
  }

  .row-buttons-mob {
    display: block;
    margin-top: 25px;
    .fa-plane {
      transform: rotate(-45deg);
    }
    .manipulator {
      width: 30px;
      height: 30px;
      padding-left: 10px;
    }
  }

  #submenu-categories {
    list-style: none;
    display: grid;
    position: relative;
    grid-template-columns: 5% minmax(150px, 700px) 5%;
    grid-template-rows: 50px;
    grid-auto-rows: 50px;
  }

  #submenu-cateogries > * {
    display: grid;
  }

  .menu-collapsed {
    grid-column: 1 / 4;
    grid-row: 1 / 2;
    max-height: 50px;
    background-color: $gray-lighter;
    color: $gray-light;

    .text {
      grid-column: 1 / 3;
      margin-top: 15px;
      padding-left: 10px;
      width: 90%;
    }
    #plus,
    #minus {
      height: 20px;
      width: 2.5%;
      margin-left: auto;
      margin-top: -20px;
      padding-right: 10px;
      color: $black;
    }
  }

  .top-item-text-color {
    color: $navy-darker;
  }

  #submenu-categories .menu-expanded {
    transition: 1s ease-out;
    grid-column: 1 / 4;
    z-index: 2;
    grid-row-gap: 0px;
    background-color: $gray-lighter;

    .submenu-category {
      display: grid;
      color: $navy-darker;
      background-color: $gray-lighter;
      padding-top: 15px;
      padding-bottom: 15px;
      margin-top: -1px;
      grid-template-columns: minmax(25px, 75px) minmax(100px, auto) minmax(
          25px,
          50px
        );
      i {
        padding-left: 15px;
        grid-column: 1 / 2;
        width: 50px;
      }
      p {
        text-transform: uppercase;
        font-weight: bold;
        color: $gray-light;
        margin: 0 auto;
        grid-column: 2 / 3;
        width: 100%;
        &.selected {
          color: inherit;
        }
      }
      input {
        margin-left: auto;
        grid-column: 3 / 4;
        width: 50px;
      }

      .fa-plane {
        transform: rotate(220deg);
        margin-top: -15px;
        margin-left: -15px;
        padding-top: 10px;
      }

      .manipulator {
        width: 25px;
        height: 25px;
        margin-top: -5px;
        padding-left: 15px;
      }
    }
  }
  .col-tags {
    display: none;
  }

  .checkbox-container {
    display: inline-block;
    margin-left: auto;
    margin-right: 20px;
    height: 10px;
    width: 10px;
    border: 2px solid $black;
  }
  .checkbox-container input {
    display: none;
  }
  .custom-checkmark {
    display: inline-block;
    position: absolute;
    margin-top: 1px;
    margin-left: 1px;
    background-color: $white;
    height: 8px;
    width: 8px;
  }

  .checkbox-container input:checked + .custom-checkmark {
    background-color: $black;
  }

  .categories-grid {
    padding-left: 1%;
    width: 100%;
    margin: 0 auto;
  }
  .grid-item {
    width: 30%;
  }
}

@media screen and (max-width: 850px) {
  .categories {
    padding-bottom: 15%;
  }
  .menu-collapsed #plus,
  .menu-collapsed #minus {
    padding-right: 20px;
  }

  .grid-wrapper {
    height: 100%;
    margin-bottom: 10%;
  }
  .categories-grid {
    max-width: 100%;
    padding-left: 0;
  }
  .grid-item {
    width: 100%;
    padding: 0;
  }
  .card {
    order: 2;
  }
  .featured {
    grid-row: auto;
    order: 1;
  }
}

@media screen and (max-width: 450px) {
  .checkbox-container {
    margin-right: 12.5px;
  }
}
